package com.ostrich.a2104shopping.ui.home.viewmodel;

import com.ostrich.a2104shopping.ui.home.HomeRepository;
import com.ostrich.a2104shopping.ui.home.entity.AddCarRequestEntity;
import com.ostrich.a2104shopping.ui.home.entity.CarEntity;
import com.ostrich.a2104shopping.ui.home.entity.IdsRequestEntity;
import com.ostrich.lib_common.net.BaseResponseEntity;

import java.util.List;

import androidx.lifecycle.LiveData;
import androidx.lifecycle.ViewModel;

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/7 09:59
 * @Description : CarViewModel
 */
public class CarViewModel extends ViewModel {
    private HomeRepository mHomeRepository = new HomeRepository();
    public LiveData<BaseResponseEntity<List<CarEntity>>> selectCar(){
        return mHomeRepository.selectCar();
    }

    public  LiveData<BaseResponseEntity<String>> deleteCar( IdsRequestEntity requestEntity){
        return mHomeRepository.deleteCar(requestEntity);
    }
    public LiveData<BaseResponseEntity> addCar( AddCarRequestEntity requestEntity){
        return mHomeRepository.addCar(requestEntity);
    }
}
